package com.fix.day1.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fix.day1.UserDao;
import com.fix.day1.UserService;

@Service
public class UserServiceImpl implements UserService {
	
	@Resource
	UserDao dao;  //不new 对象

	//加上set 方法，由容器反射调用
//	public void setDao(UserDao dao) {
//		this.dao = dao;
//	} 

	public int login(String name, String pass) {
		dao.login(name, pass);
		return 1;
	}

	

}
